package com.xaicode.template.security.controller;

import com.xaicode.template.security.entity.Msg;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @author Locker
 * @date 2021/8/20 0020 10:32
 */
@Controller
public class IndexController {

    @GetMapping("/")
    public String index(Model model) {
        Msg msg = new Msg();
        msg.setTitle("index-title");
        msg.setContent("index-content");
        msg.setExtraInfo("index-extra info");
        model.addAttribute("msg", msg);
        return "home";
    }

}
